﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

using Hangjing.Model;
using Hangjing.Common;
using Hangjing.SQLServerDAL;

/// <summary>
/// 保存用户信息
/// </summary>
public partial class APP_Android_SaveUserInfo_androidv : APIPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        StringBuilder json = new StringBuilder("");
        string state = "0";

        ECustomer dal = new ECustomer();

        int userid = HjNetHelper.GetPostParam("userid", 0);

        string nick = HjNetHelper.GetPostParam("nick");
        string pic = HjNetHelper.GetPostParam("pic");
        string tell = HjNetHelper.GetPostParam("tell");


        ECustomerInfo info = new ECustomerInfo();
        info = dal.GetModel(Convert.ToInt32(userid));


        info.Name = nick;
        info.Tell = tell;
        info.Picture = pic;

        if (dal.Update(info) > 0)
        {
            state = "1";
        }
        else
        {
            state = "-1";
        }


        Response.Write("{\"userid\":\"" + userid + "\",\"state\":\"" + state + "\"}");

        Response.End();
    }
}
